import { createStore } from 'vuex';

const store = createStore({
  state: {
    routes: []
  },
  mutations: {
    LOGIN_USER_DATA (state, routeData) {
      state.routes = routeData;
      window.sessionStorage.setItem('LOGIN_USER_DATA', JSON.stringify(routeData));
    },
    REMOVE_USER_DATA (state) {
      state.routes = [];
      window.sessionStorage.setItem('LOGIN_USER_DATA', '{}');
    }
  },
  actions: {
  },
  modules: {
  }
});

export default store;
